home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 615 b | 35 lines | [TEXT/CWIE] |
- // ConstBuffer.cp
-
- #ifndef ConstBuffer_h
- #include "ConstBuffer.h"
- #endif
- #ifndef Buffer_h
- #include "Buffer.h"
- #endif
-
- ConstBuffer::ConstBuffer( ConstData theSpace )
- : space( theSpace ),
- unused( theSpace )
- {
- Assert( !theSpace.Null() );
- }
-
- void ConstBuffer::Reset( ConstData theSpace )
- {
- Assert( !theSpace.Null() );
- space = theSpace;
- unused = theSpace;
- }
-
- void ConstBuffer::operator>>( Data target )
- {
- AdvanceMark( target << Unused() );
- }
-
- void ConstBuffer::operator>>( Buffer& target )
- {
- uint32 amount = target.Unused() << Unused();
- AdvanceMark( amount );
- target.AdvanceMark( amount );
- }
-